# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年03月16日
"""
import openpyxl

myBook=openpyxl.load_workbook('收入表.xlsx')
mySheet=myBook.active
myRange=mySheet.iter_rows(min_row=5,min_col=2,max_row=8,max_col=4)
myRowIndex=5

for myRow in myRange:
	myRowSum=sum([myCell.value for myCell in myRow])
	mySheet.cell(myRowIndex,5).value=myRowSum
	myRowIndex+=1

myBook.save('收入表.xlsx')
